#include<iostream>
#include<cmath>
using namespace std;
class C2D {
public:
	C2D(int x1, int y1) :x(x1), y(y1) {}
	void measure_L() {
		double L = pow(pow(x, 2) + pow(y, 2), 0.5);
		cout << L << endl;
	}
protected:
	int x, y;
};
class C3D :public C2D {
public:
	C3D(int x1, int y1, int z1) :C2D(x1, y1), z(z1) {}
	void measure_S() {
		double S = pow(pow(x, 2) + pow(y, 2) + pow(z, 2), 0.5);
		cout << S << endl;
	}
protected:
	int z;
};
int main()
{
	int x, y, z;
	cin >> x >> y;
	C2D c1(x, y);
	c1.measure_L();
	cin >> x >> y >> z;
	C3D c2(x, y, z);
	c2.measure_S();
	cin >> x >> y >> z;
	C3D c3(x, y, z);
	c3.measure_S();
	C2D c4(c3);
	c4.measure_L();
	return 0;
}